package com.thinkfit.jy.activity;

import android.os.Bundle;
import android.view.View;

import androidx.constraintlayout.widget.ConstraintLayout;

import com.blankj.utilcode.util.ToastUtils;
import com.common.lib.constant.Constants;
import com.thinkfit.jy.R;
import com.thinkfit.jy.utils.SportsStatusBarViewUtils;
import com.thinkfit.jy.utils.ThemeUtils;

public class SportsCenterActivity extends MainActivity{

//    TrackView trackView;
    ConstraintLayout clMain;

    protected int getLayoutId() {
        return R.layout.activity_sports_center;
    }

    @Override
    public void init() {
        resetDate();
        setViewsOnClickListener(R.id.ll_sport_back, R.id.iv_programs, R.id.iv_immersive, R.id.iv_video_course,R.id.iv_audio_course);
        clMain = findViewById(R.id.cl_main);
    }

    @Override
    public void onResume() {
        super.onResume();
        SportsStatusBarViewUtils.getInstance().isMain(false);
        clMain.setBackgroundResource(ThemeUtils.getInstance().getMainTheme());
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.ll_sport_back:
                finish();
                break;
            case R.id.iv_programs:
                Bundle bundle = new Bundle();
                bundle.putInt(Constants.BUNDLE_EXTRA, 1);
                openActivity(ProceduralTrainingActivity.class,bundle);
                break;
            case R.id.iv_immersive:
                bundle = new Bundle();
                bundle.putInt(Constants.BUNDLE_EXTRA, 4);
                openActivity(VideoActivity.class, bundle);
                break;
            case R.id.iv_video_course:
                bundle = new Bundle();
                bundle.putInt(Constants.BUNDLE_EXTRA, 1);
                openActivity(VideoActivity.class, bundle);
                break;
            case R.id.iv_audio_course:
                ToastUtils.showShort(getString(R.string.app_toast_hint_2));
                break;

        }
    }
}
